package org.easy.bytetts.dto;

import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import org.easy.core.enums.GenderType;
import lombok.Getter;
import org.apache.commons.lang3.RandomUtils;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;

@Getter
public enum ByteTtsVoiceEnums {
    zh_female_wanqudashu_moon_bigtts(GenderType.MALE, "湾区大叔", "趣味方言", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/湾区大叔.mp3", "zh_female_wanqudashu_moon_bigtts"),
    zh_female_daimengchuanmei_moon_bigtts(GenderType.FEMALE, "呆萌川妹", "趣味方言", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/呆萌川妹.mp3", "zh_female_daimengchuanmei_moon_bigtts"),
    zh_male_guozhoudege_moon_bigtts(GenderType.MALE, "广州德哥", "趣味方言", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/广州德哥.mp3", "zh_male_guozhoudege_moon_bigtts"),
    zh_male_beijingxiaoye_moon_bigtts(GenderType.MALE, "北京小爷", "趣味方言", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/北京小爷.mp3", "zh_male_beijingxiaoye_moon_bigtts"),
    zh_female_meilinvyou_moon_bigtts(GenderType.FEMALE, "魅力女友", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/魅力女友.mp3", "zh_female_meilinvyou_moon_bigtts"),
    zh_male_shenyeboke_moon_bigtts(GenderType.MALE, "深夜播客", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/深夜播客.mp3", "zh_male_shenyeboke_moon_bigtts"),
    zh_female_sajiaonvyou_moon_bigtts(GenderType.FEMALE, "柔美女友", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/柔美女友.mp3", "zh_female_sajiaonvyou_moon_bigtts"),
    zh_female_yuanqinvyou_moon_bigtts(GenderType.FEMALE, "撒娇学妹", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/撒娇学妹.mp3", "zh_female_yuanqinvyou_moon_bigtts"),
    zh_male_haoyuxiaoge_moon_bigtts(GenderType.MALE, "浩宇小哥", "趣味方言", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/浩宇小哥.mp3", "zh_male_haoyuxiaoge_moon_bigtts"),
    zh_male_guangxiyuanzhou_moon_bigtts(GenderType.MALE, "广西远舟", "趣味方言", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/广西远舟.mp3", "zh_male_guangxiyuanzhou_moon_bigtts"),
    zh_female_meituojieer_moon_bigtts(GenderType.FEMALE, "妹坨洁儿", "趣味方言", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/妹坨洁儿.mp3", "zh_female_meituojieer_moon_bigtts"),
    zh_male_yuzhouzixuan_moon_bigtts(GenderType.MALE, "豫州子轩", "趣味方言", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/豫州子轩.mp3", "zh_male_yuzhouzixuan_moon_bigtts"),
    zh_female_gaolengyujie_moon_bigtts(GenderType.FEMALE, "高冷御姐", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/高冷御姐.mp3", "zh_female_gaolengyujie_moon_bigtts"),
    zh_male_aojiaobazong_moon_bigtts(GenderType.MALE, "傲娇霸总", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/傲娇霸总.mp3", "zh_male_aojiaobazong_moon_bigtts"),
    zh_male_jingqiangkanye_moon_bigtts(GenderType.MALE, "京腔侃爷/Harmony", "趣味方言", "中/英", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/京腔侃爷.mp3", "zh_male_jingqiangkanye_moon_bigtts"),
    zh_female_wanwanxiaohe_moon_bigtts(GenderType.MALE, "湾湾小何", "趣味方言", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/%E6%B9%BE%E6%B9%BE%E5%B0%8F%E4%BD%95.mp3", "zh_female_wanwanxiaohe_moon_bigtts"),
    multi_female_shuangkuaisisi_moon_bigtts(GenderType.FEMALE, "はるこ/Esmeralda", "多语种", "日/西", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/晴子.wav", "multi_female_shuangkuaisisi_moon_bigtts"),
    multi_male_jingqiangkanye_moon_bigtts(GenderType.FEMALE, "かずね/Javier or Álvaro", "多语种", "日/西", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/和音.wav", "multi_male_jingqiangkanye_moon_bigtts"),
    multi_female_gaolengyujie_moon_bigtts(GenderType.FEMALE, "あけみ", "多语种", "日语", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/朱美.mp3", "multi_female_gaolengyujie_moon_bigtts"),
    multi_male_wanqudashu_moon_bigtts(GenderType.FEMALE, "ひろし/Roberto", "多语种", "日/西", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/広志.mp3", "multi_male_wanqudashu_moon_bigtts"),
    ICL_zh_female_bingruoshaonv_tob(GenderType.FEMALE, "病弱少女", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/%E7%97%85%E5%BC%B1%E5%B0%91%E5%A5%B3.mp3", "ICL_zh_female_bingruoshaonv_tob"),
    ICL_zh_female_huoponvhai_tob(GenderType.FEMALE, "活泼女孩", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/%E6%B4%BB%E6%B3%BC%E5%A5%B3%E5%AD%A9.mp3", "ICL_zh_female_huoponvhai_tob"),
    ICL_zh_female_heainainai_tob(GenderType.FEMALE, "和蔼奶奶", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/%E5%92%8C%E8%94%BC%E5%A5%B6%E5%A5%B6.mp3", "ICL_zh_female_heainainai_tob"),
    ICL_zh_female_linjuayi_tob(GenderType.FEMALE, "邻居阿姨", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/%E9%82%BB%E5%B1%85%E9%98%BF%E5%A7%A8.mp3", "ICL_zh_female_linjuayi_tob"),
    zh_female_wenrouxiaoya_moon_bigtts(GenderType.FEMALE, "温柔小雅", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/%E6%B8%A9%E6%9F%94%E5%B0%8F%E9%9B%85.mp3", "zh_female_wenrouxiaoya_moon_bigtts"),
    zh_male_dongfanghaoran_moon_bigtts(GenderType.MALE, "东方浩然", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/portal/bigtts/%E4%B8%9C%E6%96%B9%E6%B5%A9%E7%84%B6.mp3", "zh_male_dongfanghaoran_moon_bigtts"),
    zh_male_tiancaitongsheng_mars_bigtts(GenderType.MALE, "天才童声", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/zh_male_tiancaitongsheng_mars_bigtts.mp3", "zh_male_tiancaitongsheng_mars_bigtts"),
    zh_male_naiqimengwa_mars_bigtts(GenderType.MALE, "奶气萌娃", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/zh_male_naiqimengwa_mars_bigtts.mp3", "zh_male_naiqimengwa_mars_bigtts"),
    zh_male_sunwukong_mars_bigtts(GenderType.MALE, "猴哥", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/zh_male_sunwukong_mars_bigtts.mp3", "zh_male_sunwukong_mars_bigtts"),
    zh_male_xionger_mars_bigtts(GenderType.MALE, "熊二", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/zh_male_xionger_mars_bigtts.mp3", "zh_male_xionger_mars_bigtts"),
    zh_female_peiqi_mars_bigtts(GenderType.MALE, "佩奇猪", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/zh_female_peiqi_mars_bigtts.mp3", "zh_female_peiqi_mars_bigtts"),
    zh_female_popo_mars_bigtts(GenderType.FEMALE, "婆婆", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/zh_female_popo_mars_bigtts.mp3", "zh_female_popo_mars_bigtts"),
    zh_female_wuzetian_mars_bigtts(GenderType.FEMALE, "武则天", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/zh_female_wuzetian_mars_bigtts.mp3", "zh_female_wuzetian_mars_bigtts"),
    zh_female_shaoergushi_mars_bigtts(GenderType.MALE, "少儿故事", "角色扮演", "中/英", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/zh_female_shaoergushi_mars_bigtts.mp3", "zh_female_shaoergushi_mars_bigtts"),
    zh_male_silang_mars_bigtts(GenderType.MALE, "四郎", "角色扮演", "中/英", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/zh_male_silang_mars_bigtts.mp3", "zh_male_silang_mars_bigtts"),
    zh_female_gujie_mars_bigtts(GenderType.FEMALE, "顾姐", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/zh_female_gujie_mars_bigtts.mp3", "zh_female_gujie_mars_bigtts"),
    zh_female_yingtaowanzi_mars_bigtts(GenderType.FEMALE, "樱桃丸子", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/zh_female_yingtaowanzi_mars_bigtts.mp3", "zh_female_yingtaowanzi_mars_bigtts"),
    zh_female_qiaopinvsheng_mars_bigtts(GenderType.FEMALE, "俏皮女声", "角色扮演", "中/英", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/zh_female_qiaopinvsheng_mars_bigtts.mp3", "zh_female_qiaopinvsheng_mars_bigtts"),
    zh_female_mengyatou_mars_bigtts(GenderType.FEMALE, "萌丫头", "角色扮演", "中/英", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/zh_female_mengyatou_mars_bigtts.mp3", "zh_female_mengyatou_mars_bigtts"),
    en_male_adam_mars_bigtts(GenderType.FEMALE, "Adam", "多语种", "英语", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/en_male_adam_mars_bigtts.mp3", "en_male_adam_mars_bigtts"),
    en_female_sarah_mars_bigtts(GenderType.MALE, "Sarah", "多语种", "英语", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/en_female_sarah_mars_bigtts.mp3", "en_female_sarah_mars_bigtts"),
    en_male_dryw_mars_bigtts(GenderType.MALE, "Dryw", "多语种", "英语", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/en_male_dryw_mars_bigtts.mp3", "en_male_dryw_mars_bigtts"),
    en_male_smith_mars_bigtts(GenderType.MALE, "Smith", "多语种", "英语", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/en_male_smith_mars_bigtts.mp3", "en_male_smith_mars_bigtts"),
    zh_male_ruyaqingnian_mars_bigtts(GenderType.MALE, "儒雅青年", "有声阅读", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/zh_male_ruyaqingnian_mars_bigtts.mp3", "zh_male_ruyaqingnian_mars_bigtts"),
    zh_male_baqiqingshu_mars_bigtts(GenderType.MALE, "霸气青叔", "有声阅读", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/zh_male_baqiqingshu_mars_bigtts.mp3", "zh_male_baqiqingshu_mars_bigtts"),
    zh_male_qingcang_mars_bigtts(GenderType.MALE, "擎苍", "有声阅读", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/zh_male_qingcang_mars_bigtts.mp3", "zh_male_qingcang_mars_bigtts"),
    zh_male_yangguangqingnian_mars_bigtts(GenderType.MALE, "活力小哥", "有声阅读", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/zh_male_yangguangqingnian_mars_bigtts.mp3", "zh_male_yangguangqingnian_mars_bigtts"),
    zh_female_gufengshaoyu_mars_bigtts(GenderType.MALE, "古风少御", "有声阅读", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/zh_female_gufengshaoyu_mars_bigtts.mp3", "zh_female_gufengshaoyu_mars_bigtts"),
    zh_female_wenroushunv_mars_bigtts(GenderType.FEMALE, "温柔淑女", "有声阅读", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/zh_female_wenroushunv_mars_bigtts.mp3", "zh_female_wenroushunv_mars_bigtts"),
    ICL_zh_male_lvchaxiaoge_tob(GenderType.MALE, "绿茶小哥", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_lvchaxiaoge_tob.mp3", "ICL_zh_male_lvchaxiaoge_tob"),
    ICL_zh_female_jiaoruoluoli_tob(GenderType.FEMALE, "娇弱萝莉", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_female_jiaoruoluoli_tob.mp3", "ICL_zh_female_jiaoruoluoli_tob"),
    ICL_zh_male_lengdanshuli_tob(GenderType.MALE, "冷淡疏离", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_lengdanshuli_tob.mp3", "ICL_zh_male_lengdanshuli_tob"),
    ICL_zh_male_hanhoudunshi_tob(GenderType.MALE, "憨厚敦实", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_hanhoudunshi_tob.mp3", "ICL_zh_male_hanhoudunshi_tob"),
    ICL_zh_male_aiqilingren_tob(GenderType.MALE, "傲气凌人", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_aiqilingren_tob.mp3", "ICL_zh_male_aiqilingren_tob"),
    ICL_zh_female_huopodiaoman_tob(GenderType.MALE, "活泼刁蛮", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_female_huopodiaoman_tob.mp3", "ICL_zh_female_huopodiaoman_tob"),
    ICL_zh_male_guzhibingjiao_tob(GenderType.FEMALE, "固执病娇", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_guzhibingjiao_tob.mp3", "ICL_zh_male_guzhibingjiao_tob"),
    ICL_zh_female_aomanjiaosheng_tob(GenderType.FEMALE, "傲慢娇声", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_female_aomanjiaosheng_tob.mp3", "ICL_zh_female_aomanjiaosheng_tob"),
    ICL_zh_male_xiaosasuixing_tob(GenderType.MALE, "潇洒随性", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_xiaosasuixing_tob.mp3", "ICL_zh_male_xiaosasuixing_tob"),
    ICL_zh_male_fuheigongzi_tob(GenderType.MALE, "腹黑公子", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_fuheigongzi_tob.mp3", "ICL_zh_male_fuheigongzi_tob"),
    ICL_zh_male_guiyishenmi_tob(GenderType.MALE, "诡异神秘", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_guiyishenmi_tob.mp3", "ICL_zh_male_guiyishenmi_tob"),
    ICL_zh_male_ruyacaijun_tob(GenderType.MALE, "儒雅才俊", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_ruyacaijun_tob.mp3", "ICL_zh_male_ruyacaijun_tob"),
    ICL_zh_male_bingjiaobailian_tob(GenderType.FEMALE, "病娇白莲", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_bingjiaobailian_tob.mp3", "ICL_zh_male_bingjiaobailian_tob"),
    ICL_zh_male_zhengzhiqingnian_tob(GenderType.MALE, "正直青年", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_zhengzhiqingnian_tob.mp3", "ICL_zh_male_zhengzhiqingnian_tob"),
    ICL_zh_female_jiaohannvwang_tob(GenderType.FEMALE, "娇憨女王", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_female_jiaohannvwang_tob.mp3", "ICL_zh_female_jiaohannvwang_tob"),
    ICL_zh_female_bingjiaomengmei_tob(GenderType.FEMALE, "病娇萌妹", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_female_bingjiaomengmei_tob.mp3", "ICL_zh_female_bingjiaomengmei_tob"),
    ICL_zh_male_qingsenaigou_tob(GenderType.MALE, "青涩小生", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_qingsenaigou_tob.mp3", "ICL_zh_male_qingsenaigou_tob"),
    ICL_zh_male_chunzhenxuedi_tob(GenderType.MALE, "纯真学弟", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_chunzhenxuedi_tob.mp3", "ICL_zh_male_chunzhenxuedi_tob"),
    ICL_zh_female_nuanxinxuejie_tob(GenderType.FEMALE, "暖心学姐", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_female_nuanxinxuejie_tob.mp3", "ICL_zh_female_nuanxinxuejie_tob"),
    ICL_zh_female_keainvsheng_tob(GenderType.FEMALE, "可爱女生", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_female_keainvsheng_tob.mp3", "ICL_zh_female_keainvsheng_tob"),
    ICL_zh_female_chengshujiejie_tob(GenderType.FEMALE, "成熟姐姐", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_female_chengshujiejie_tob.mp3", "ICL_zh_female_chengshujiejie_tob"),
    ICL_zh_female_bingjiaojiejie_tob(GenderType.FEMALE, "病娇姐姐", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_female_bingjiaojiejie_tob.mp3", "ICL_zh_female_bingjiaojiejie_tob"),
    ICL_zh_male_youroubangzhu_tob(GenderType.MALE, "优柔帮主", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_youroubangzhu_tob.mp3", "ICL_zh_male_youroubangzhu_tob"),
    ICL_zh_male_yourougongzi_tob(GenderType.MALE, "优柔公子", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_yourougongzi_tob.mp3", "ICL_zh_male_yourougongzi_tob"),
    ICL_zh_female_wumeiyujie_tob(GenderType.FEMALE, "妩媚御姐", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_female_wumeiyujie_tob.mp3", "ICL_zh_female_wumeiyujie_tob"),
    ICL_zh_female_tiaopigongzhu_tob(GenderType.FEMALE, "调皮公主", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_female_tiaopigongzhu_tob.mp3", "ICL_zh_female_tiaopigongzhu_tob"),
    ICL_zh_female_aojiaonvyou_tob(GenderType.FEMALE, "傲娇女友", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_female_aojiaonvyou_tob.mp3", "ICL_zh_female_aojiaonvyou_tob"),
    ICL_zh_male_tiexinnanyou_tob(GenderType.MALE, "贴心男友", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_tiexinnanyou_tob.mp3", "ICL_zh_male_tiexinnanyou_tob"),
    ICL_zh_male_shaonianjiangjun_tob(GenderType.MALE, "少年将军", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_shaonianjiangjun_tob.mp3", "ICL_zh_male_shaonianjiangjun_tob"),
    ICL_zh_female_tiexinnvyou_tob(GenderType.FEMALE, "贴心女友", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_female_tiexinnvyou_tob.mp3", "ICL_zh_female_tiexinnvyou_tob"),
    ICL_zh_male_bingjiaogege_tob(GenderType.MALE, "病娇哥哥", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_bingjiaogege_tob.mp3", "ICL_zh_male_bingjiaogege_tob"),
    ICL_zh_male_xuebanantongzhuo_tob(GenderType.MALE, "学霸男同桌", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_xuebanantongzhuo_tob.mp3", "ICL_zh_male_xuebanantongzhuo_tob"),
    ICL_zh_male_youmoshushu_tob(GenderType.MALE, "幽默叔叔", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_youmoshushu_tob.mp3", "ICL_zh_male_youmoshushu_tob"),
    ICL_zh_female_xingganyujie_tob(GenderType.FEMALE, "性感御姐", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_female_xingganyujie_tob.mp3", "ICL_zh_female_xingganyujie_tob"),
    ICL_zh_female_jiaxiaozi_tob(GenderType.MALE, "假小子", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_female_jiaxiaozi_tob.mp3", "ICL_zh_female_jiaxiaozi_tob"),
    ICL_zh_male_lengjunshangsi_tob(GenderType.MALE, "冷峻上司", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_lengjunshangsi_tob.mp3", "ICL_zh_male_lengjunshangsi_tob"),
    ICL_zh_male_wenrounantongzhuo_tob(GenderType.MALE, "温柔男同桌", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_wenrounantongzhuo_tob.mp3", "ICL_zh_male_wenrounantongzhuo_tob"),
    ICL_zh_male_bingjiaodidi_tob(GenderType.MALE, "病娇弟弟", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_bingjiaodidi_tob.mp3", "ICL_zh_male_bingjiaodidi_tob"),
    ICL_zh_male_youmodaye_tob(GenderType.MALE, "幽默大爷", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_youmodaye_tob.mp3", "ICL_zh_male_youmodaye_tob"),
    ICL_zh_male_aomanshaoye_tob(GenderType.MALE, "傲慢少爷", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_aomanshaoye_tob.mp3", "ICL_zh_male_aomanshaoye_tob"),
    ICL_zh_male_shenmifashi_tob(GenderType.MALE, "神秘法师", "角色扮演", "中文", "https://lf3-static.bytednsdoc.com/obj/eden-cn/lm_hz_ihsph/ljhwZthlaukjlkulzlp/console/bigtts/ICL_zh_male_shenmifashi_tob.mp3", "ICL_zh_male_shenmifashi_tob"),
    ;

    private final GenderType gender;
    private final String resourceDisplay;
    private final String recommendedScenario;
    private final String language;
    private final String demoLink;
    private final String voiceType;

    ByteTtsVoiceEnums(GenderType gender, String resourceDisplay, String recommendedScenario, String language, String demoLink, String voiceType) {
        this.gender = gender;
        this.resourceDisplay = resourceDisplay;
        this.recommendedScenario = recommendedScenario;
        this.language = language;
        this.demoLink = demoLink;
        this.voiceType = voiceType;
    }


    public static ByteTtsVoiceEnums randomByGander(GenderType gender) {
        List<ByteTtsVoiceEnums> collect = Arrays.stream(values()).filter(e -> e.getGender().equals(gender)).collect(Collectors.toList());
        return collect.get(RandomUtils.nextInt(0, collect.size() - 1));
    }

    public static void main(String[] args) {
        ByteTtsVoiceEnums byteTtsVoiceEnums = ByteTtsVoiceEnums.randomByGander(GenderType.FEMALE);
        System.out.println(byteTtsVoiceEnums);

    }


    public static ByteTtsVoiceEnums fromCode(String code) {
        for (ByteTtsVoiceEnums action : values()) {
            if (Objects.equals(action.getVoiceType(), code)) {
                return action;
            }
        }
        throw new IllegalArgumentException("No matching constant for [" + code + "]");
    }

    public static List<ByteTtsVoiceModel> toModels() {
        List<ByteTtsVoiceModel> models = new ArrayList<>();
        for (ByteTtsVoiceEnums value : values()) {
            models.add(new ByteTtsVoiceModel(
                    value.getResourceDisplay(),
                    value.getRecommendedScenario(),
                    value.getLanguage(),
                    value.getDemoLink(),
                    value.getVoiceType()));
        }
        return models;
    }


    public static ByteTtsVoiceEnums convertJsonToEnum(String json) {
        JSONObject jsonObject = JSON.parseObject(json);
        String resourceDisplay = jsonObject.getString("resource_display");
        JSONObject details = jsonObject.getJSONObject("details");
        String recommendedScenario = details.getString("recommended_scenario");
        String language = details.getString("language");
        String demoLink = details.getString("demo_link");
        String voiceType = details.getString("voice_type");
        // 遍历枚举，找到匹配的枚举值
        for (ByteTtsVoiceEnums value : ByteTtsVoiceEnums.values()) {
            if (value.resourceDisplay.equals(resourceDisplay) && value.recommendedScenario.equals(recommendedScenario) && value.language.equals(language) && value.demoLink.equals(demoLink) && value.voiceType.equals(voiceType)) {
                return value;
            }
        }
        return null;
    }

    public static String readFile(String filePath) {
        StringBuilder content = new StringBuilder();
        try (BufferedReader reader = new BufferedReader(new FileReader(filePath))) {
            String line;
            while ((line = reader.readLine()) != null) {
                content.append(line).append("\n");
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
        return content.toString();
    }

}
